
package com.audi.user.model;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.SequenceGenerator;
import javax.persistence.Table;

import org.apache.commons.lang.builder.EqualsBuilder;
import org.apache.commons.lang.builder.HashCodeBuilder;
import org.apache.commons.lang.builder.ToStringBuilder;
import org.apache.commons.lang.builder.ToStringStyle;
import org.hibernate.annotations.GenericGenerator;


@Entity
@Table(name = "tbl_email_check")
public class EmailCheck implements java.io.Serializable{
	private static final long serialVersionUID = 5454155825314635342L;
	
	
    /**
     * checkId       db_column: check_id 
     */ 	
	
	private Long checkId;
    /**
     * userId       db_column: user_id 
     */ 	
	
	private Long userId;
    /**
     * loginName       db_column: login_name 
     */ 	
	//@Length(max=64)
	private java.lang.String loginName;
    /**
     * randCode       db_column: rand_code 
     */ 	
	//@Length(max=32)
	private java.lang.String randCode;
    /**
     * email       db_column: email 
     */ 	
	//@Email @Length(max=64)
	private java.lang.String email;
    /**
     * type       db_column: type 
     */ 	
	
	private Long type;
    /**
     * emailDesc       db_column: email_desc 
     */ 	
	//@Email @Length(max=512)
	private java.lang.String emailDesc;
    /**
     * beginTime       db_column: begin_time 
     */ 	
	
	private java.util.Date beginTime;
    /**
     * endTime       db_column: end_time 
     */ 	
	
	private java.util.Date endTime;
    /**
     * createTime       db_column: create_time 
     */ 	
	
	private java.util.Date createTime;
    /**
     * status       db_column: status 
     */ 	
	
	private Long status;
    /**
     * descn       db_column: descn 
     */ 	
	//@Length(max=256)
	private java.lang.String descn;
	//columns END


	public EmailCheck(){
	}

	public EmailCheck(
		Long checkId
	){
		this.checkId = checkId;
	}

	

	public void setCheckId(Long value) {
		this.checkId = value;
	}
	
	@Id 
	//@SequenceGenerator(name="email_check_SEQ",sequenceName="seq_email_check")
    //@GeneratedValue(strategy=GenerationType.SEQUENCE,generator="email_check_SEQ") 
	@GenericGenerator(name="custom-id", strategy = "identity")
    @GeneratedValue(generator="custom-id")
	@Column(name = "check_id")
	public Long getCheckId() {
		return this.checkId;
	}
	
	@Column(name = "user_id", unique = false, nullable = true, insertable = true, updatable = true, length = 22)
	public Long getUserId() {
		return this.userId;
	}
	
	public void setUserId(Long value) {
		this.userId = value;
	}
	
	@Column(name = "login_name", unique = false, nullable = true, insertable = true, updatable = true, length = 64)
	public java.lang.String getLoginName() {
		return this.loginName;
	}
	
	public void setLoginName(java.lang.String value) {
		this.loginName = value;
	}
	
	@Column(name = "rand_code", unique = false, nullable = true, insertable = true, updatable = true, length = 32)
	public java.lang.String getRandCode() {
		return this.randCode;
	}
	
	public void setRandCode(java.lang.String value) {
		this.randCode = value;
	}
	
	@Column(name = "email", unique = false, nullable = true, insertable = true, updatable = true, length = 64)
	public java.lang.String getEmail() {
		return this.email;
	}
	
	public void setEmail(java.lang.String value) {
		this.email = value;
	}
	
	@Column(name = "type", unique = false, nullable = true, insertable = true, updatable = true, length = 22)
	public Long getType() {
		return this.type;
	}
	
	public void setType(Long value) {
		this.type = value;
	}
	
	@Column(name = "email_desc", unique = false, nullable = true, insertable = true, updatable = true, length = 512)
	public java.lang.String getEmailDesc() {
		return this.emailDesc;
	}
	
	public void setEmailDesc(java.lang.String value) {
		this.emailDesc = value;
	}
	
	
	@Column(name = "begin_time", unique = false, nullable = true, insertable = true, updatable = true, length = 7)
	public java.util.Date getBeginTime() {
		return this.beginTime;
	}
	
	public void setBeginTime(java.util.Date value) {
		this.beginTime = value;
	}
	

	
	@Column(name = "end_time", unique = false, nullable = true, insertable = true, updatable = true, length = 7)
	public java.util.Date getEndTime() {
		return this.endTime;
	}
	
	public void setEndTime(java.util.Date value) {
		this.endTime = value;
	}
	

	
	@Column(name = "create_time", unique = false, nullable = true, insertable = true, updatable = true, length = 7)
	public java.util.Date getCreateTime() {
		return this.createTime;
	}
	
	public void setCreateTime(java.util.Date value) {
		this.createTime = value;
	}
	
	@Column(name = "status", unique = false, nullable = true, insertable = true, updatable = true, length = 22)
	public Long getStatus() {
		return this.status;
	}
	
	public void setStatus(Long value) {
		this.status = value;
	}
	
	@Column(name = "descn", unique = false, nullable = true, insertable = true, updatable = true, length = 256)
	public java.lang.String getDescn() {
		return this.descn;
	}
	
	public void setDescn(java.lang.String value) {
		this.descn = value;
	}
	

	public String toString() {
		return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
			.append("CheckId",getCheckId())
			.append("UserId",getUserId())
			.append("LoginName",getLoginName())
			.append("RandCode",getRandCode())
			.append("Email",getEmail())
			.append("Type",getType())
			.append("EmailDesc",getEmailDesc())
			.append("BeginTime",getBeginTime())
			.append("EndTime",getEndTime())
			.append("CreateTime",getCreateTime())
			.append("Status",getStatus())
			.append("Descn",getDescn())
			.toString();
	}
	
	public int hashCode() {
		return new HashCodeBuilder()
			.append(getCheckId())
			.toHashCode();
	}
	
	public boolean equals(Object obj) {
		if(obj instanceof EmailCheck == false) return false;
		if(this == obj) return true;
		EmailCheck other = (EmailCheck)obj;
		return new EqualsBuilder()
			.append(getCheckId(),other.getCheckId())
			.isEquals();
	}
}

